<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Percentile (Apache Commons Math 3.6.1 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Percentile (Apache Commons Math 3.6.1 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Percentile.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Min.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/commons/math3/stat/descriptive/rank/Percentile.html" target="_top">Frames</a></li>
<li><a href="Percentile.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.stat.descriptive.rank</div>
<h2 title="Class Percentile" class="title">Class Percentile</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">org.apache.commons.math3.stat.descriptive.AbstractUnivariateStatistic</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.stat.descriptive.rank.Percentile</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/UnivariateStatistic.html" title="interface in org.apache.commons.math3.stat.descriptive">UnivariateStatistic</a>, <a href="../../../../../../../org/apache/commons/math3/util/MathArrays.Function.html" title="interface in org.apache.commons.math3.util">MathArrays.Function</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Median.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Median</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Percentile</span>
extends <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">AbstractUnivariateStatistic</a>
implements <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">Provides percentile computation.
 <p>
 There are several commonly used methods for estimating percentiles (a.k.a.
 quantiles) based on sample data.  For large samples, the different methods
 agree closely, but when sample sizes are small, different methods will give
 significantly different results.  The algorithm implemented here works as follows:
 <ol>
 <li>Let <code>n</code> be the length of the (sorted) array and
 <code>0 < p <= 100</code> be the desired percentile.</li>
 <li>If <code> n = 1 </code> return the unique array element (regardless of
 the value of <code>p</code>); otherwise </li>
 <li>Compute the estimated percentile position
 <code> pos = p * (n + 1) / 100</code> and the difference, <code>d</code>
 between <code>pos</code> and <code>floor(pos)</code> (i.e. the fractional
 part of <code>pos</code>).</li>
 <li> If <code>pos < 1</code> return the smallest element in the array.</li>
 <li> Else if <code>pos >= n</code> return the largest element in the array.</li>
 <li> Else let <code>lower</code> be the element in position
 <code>floor(pos)</code> in the array and let <code>upper</code> be the
 next element in the array.  Return <code>lower + d * (upper - lower)</code>
 </li>
 </ol></p>
 <p>
 To compute percentiles, the data must be at least partially ordered.  Input
 arrays are copied and recursively partitioned using an ordering definition.
 The ordering used by <code>Arrays.sort(double[])</code> is the one determined
 by <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html?is-external=true#compareTo(java.lang.Double)" title="class or interface in java.lang"><code>Double.compareTo(Double)</code></a>.  This ordering makes
 <code>Double.NaN</code> larger than any other value (including
 <code>Double.POSITIVE_INFINITY</code>).  Therefore, for example, the median
 (50th percentile) of
 <code>{0, 1, 2, 3, 4, Double.NaN}</code> evaluates to <code>2.5.</code></p>
 <p>
 Since percentile estimation usually involves interpolation between array
 elements, arrays containing  <code>NaN</code> or infinite values will often
 result in <code>NaN</code> or infinite values returned.</p>
 <p>
 Further, to include different estimation types such as R1, R2 as mentioned in
 <a href="http://en.wikipedia.org/wiki/Quantile">Quantile page(wikipedia)</a>,
 a type specific NaN handling strategy is used to closely match with the
 typically observed results from popular tools like R(R1-R9), Excel(R7).</p>
 <p>
 Since 2.2, Percentile uses only selection instead of complete sorting
 and caches selection algorithm state between calls to the various
 <code>evaluate</code> methods. This greatly improves efficiency, both for a single
 percentile and multiple percentile computations. To maximize performance when
 multiple percentiles are computed based on the same data, users should set the
 data array once using either one of the <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#evaluate(double[],%20double)"><code>evaluate(double[], double)</code></a> or
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setData(double[])"><code>setData(double[])</code></a> methods and thereafter <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#evaluate(double)"><code>evaluate(double)</code></a>
 with just the percentile provided.
 </p>
 <p>
 <strong>Note that this implementation is not synchronized.</strong> If
 multiple threads access an instance of this class concurrently, and at least
 one of the threads invokes the <code>increment()</code> or
 <code>clear()</code> method, it must be synchronized externally.</p></div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../serialized-form.html#org.apache.commons.math3.stat.descriptive.rank.Percentile">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a></strong></code>
<div class="block">An enum for various estimation strategies of a percentile referred in
 <a href="http://en.wikipedia.org/wiki/Quantile">wikipedia on quantile</a>
 with the names of enum matching those of types mentioned in
 wikipedia.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#Percentile()">Percentile</a></strong>()</code>
<div class="block">Constructs a Percentile with the following defaults.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#Percentile(double)">Percentile</a></strong>(double&nbsp;quantile)</code>
<div class="block">Constructs a Percentile with the specific quantile value and the following
 
   default method type: <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html#LEGACY"><code>Percentile.EstimationType.LEGACY</code></a>
   default NaN strategy: <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html#REMOVED"><code>NaNStrategy.REMOVED</code></a>
   a Kth Selector : <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>KthSelector</code></a>
 </div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#Percentile(double,%20org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType,%20org.apache.commons.math3.stat.ranking.NaNStrategy,%20org.apache.commons.math3.util.KthSelector)">Percentile</a></strong>(double&nbsp;quantile,
          <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a>&nbsp;estimationType,
          <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</a>&nbsp;nanStrategy,
          <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util">KthSelector</a>&nbsp;kthSelector)</code>
<div class="block">Constructs a Percentile with the specific quantile value,
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>Percentile.EstimationType</code></a>, <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaNStrategy</code></a> and <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>KthSelector</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#Percentile(org.apache.commons.math3.stat.descriptive.rank.Percentile)">Percentile</a></strong>(<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;original)</code>
<div class="block">Copy constructor, creates a new <code>Percentile</code> identical
 to the <code>original</code></div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#copy()">copy</a></strong>()</code>
<div class="block">Returns a copy of the statistic with the same internal state.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#copy(org.apache.commons.math3.stat.descriptive.rank.Percentile,%20org.apache.commons.math3.stat.descriptive.rank.Percentile)">copy</a></strong>(<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;source,
    <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;dest)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>as of 3.4 this method does not work anymore, as it fails to
 copy internal states between instances configured with different
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>estimation type</code></a>, <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaN handling strategies</code></a>
 and <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>kthSelector</code></a>, it therefore always
 throw <a href="../../../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception"><code>MathUnsupportedOperationException</code></a></i></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#evaluate(double)">evaluate</a></strong>(double&nbsp;p)</code>
<div class="block">Returns the result of evaluating the statistic over the stored data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#evaluate(double[],%20double)">evaluate</a></strong>(double[]&nbsp;values,
        double&nbsp;p)</code>
<div class="block">Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#evaluate(double[],%20int,%20int)">evaluate</a></strong>(double[]&nbsp;values,
        int&nbsp;start,
        int&nbsp;length)</code>
<div class="block">Returns an estimate of the <code>quantile</code>th percentile of the
 designated values in the <code>values</code> array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#evaluate(double[],%20int,%20int,%20double)">evaluate</a></strong>(double[]&nbsp;values,
        int&nbsp;begin,
        int&nbsp;length,
        double&nbsp;p)</code>
<div class="block">Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array, starting with the element in (0-based)
 position <code>begin</code> in the array and including <code>length</code>
 values.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#getEstimationType()">getEstimationType</a></strong>()</code>
<div class="block">Get the estimation <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>type</code></a> used for computation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util">KthSelector</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#getKthSelector()">getKthSelector</a></strong>()</code>
<div class="block">Get the <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>kthSelector</code></a> used for computation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#getNaNStrategy()">getNaNStrategy</a></strong>()</code>
<div class="block">Get the <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaN Handling</code></a> strategy used for computation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/util/PivotingStrategyInterface.html" title="interface in org.apache.commons.math3.util">PivotingStrategyInterface</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#getPivotingStrategy()">getPivotingStrategy</a></strong>()</code>
<div class="block">Get the <a href="../../../../../../../org/apache/commons/math3/util/PivotingStrategyInterface.html" title="interface in org.apache.commons.math3.util"><code>PivotingStrategyInterface</code></a> used in KthSelector for computation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#getQuantile()">getQuantile</a></strong>()</code>
<div class="block">Returns the value of the quantile field (determines what percentile is
 computed when evaluate() is called with no quantile argument).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#getWorkArray(double[],%20int,%20int)">getWorkArray</a></strong>(double[]&nbsp;values,
            int&nbsp;begin,
            int&nbsp;length)</code>
<div class="block">Get the work array to operate.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setData(double[])">setData</a></strong>(double[]&nbsp;values)</code>
<div class="block">Set the data array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setData(double[],%20int,%20int)">setData</a></strong>(double[]&nbsp;values,
       int&nbsp;begin,
       int&nbsp;length)</code>
<div class="block">Set the data array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setQuantile(double)">setQuantile</a></strong>(double&nbsp;p)</code>
<div class="block">Sets the value of the quantile field (determines what percentile is
 computed when evaluate() is called with no quantile argument).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#withEstimationType(org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType)">withEstimationType</a></strong>(<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a>&nbsp;newEstimationType)</code>
<div class="block">Build a new instance similar to the current one except for the
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>estimation type</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#withKthSelector(org.apache.commons.math3.util.KthSelector)">withKthSelector</a></strong>(<a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util">KthSelector</a>&nbsp;newKthSelector)</code>
<div class="block">Build a new instance similar to the current one except for the
 <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>kthSelector</code></a> instance specifically set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#withNaNStrategy(org.apache.commons.math3.stat.ranking.NaNStrategy)">withNaNStrategy</a></strong>(<a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</a>&nbsp;newNaNStrategy)</code>
<div class="block">Build a new instance similar to the current one except for the
 <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaN handling</code></a> strategy.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.stat.descriptive.AbstractUnivariateStatistic">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.stat.descriptive.<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">AbstractUnivariateStatistic</a></h3>
<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#evaluate()">evaluate</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#evaluate(double[])">evaluate</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#getData()">getData</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#getDataRef()">getDataRef</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#test(double[],%20double[],%20int,%20int)">test</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#test(double[],%20double[],%20int,%20int,%20boolean)">test</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#test(double[],%20int,%20int)">test</a>, <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#test(double[],%20int,%20int,%20boolean)">test</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Percentile()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Percentile</h4>
<pre>public&nbsp;Percentile()</pre>
<div class="block">Constructs a Percentile with the following defaults.
 <ul>
   <li>default quantile: 50.0, can be reset with <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setQuantile(double)"><code>setQuantile(double)</code></a></li>
   <li>default estimation type: <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html#LEGACY"><code>Percentile.EstimationType.LEGACY</code></a>,
   can be reset with <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#withEstimationType(org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType)"><code>withEstimationType(EstimationType)</code></a></li>
   <li>default NaN strategy: <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html#REMOVED"><code>NaNStrategy.REMOVED</code></a>,
   can be reset with <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#withNaNStrategy(org.apache.commons.math3.stat.ranking.NaNStrategy)"><code>withNaNStrategy(NaNStrategy)</code></a></li>
   <li>a KthSelector that makes use of <a href="../../../../../../../org/apache/commons/math3/util/MedianOf3PivotingStrategy.html" title="class in org.apache.commons.math3.util"><code>MedianOf3PivotingStrategy</code></a>,
   can be reset with <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#withKthSelector(org.apache.commons.math3.util.KthSelector)"><code>withKthSelector(KthSelector)</code></a></li>
 </ul></div>
</li>
</ul>
<a name="Percentile(double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Percentile</h4>
<pre>public&nbsp;Percentile(double&nbsp;quantile)
           throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Constructs a Percentile with the specific quantile value and the following
 <ul>
   <li>default method type: <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html#LEGACY"><code>Percentile.EstimationType.LEGACY</code></a></li>
   <li>default NaN strategy: <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html#REMOVED"><code>NaNStrategy.REMOVED</code></a></li>
   <li>a Kth Selector : <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>KthSelector</code></a></li>
 </ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>quantile</code> - the quantile</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if p is not greater than 0 and less
 than or equal to 100</dd></dl>
</li>
</ul>
<a name="Percentile(org.apache.commons.math3.stat.descriptive.rank.Percentile)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Percentile</h4>
<pre>public&nbsp;Percentile(<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;original)
           throws <a href="../../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></pre>
<div class="block">Copy constructor, creates a new <code>Percentile</code> identical
 to the <code>original</code></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>original</code> - the <code>Percentile</code> instance to copy</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if original is null</dd></dl>
</li>
</ul>
<a name="Percentile(double, org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType, org.apache.commons.math3.stat.ranking.NaNStrategy, org.apache.commons.math3.util.KthSelector)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Percentile</h4>
<pre>protected&nbsp;Percentile(double&nbsp;quantile,
          <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a>&nbsp;estimationType,
          <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</a>&nbsp;nanStrategy,
          <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util">KthSelector</a>&nbsp;kthSelector)
              throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Constructs a Percentile with the specific quantile value,
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>Percentile.EstimationType</code></a>, <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaNStrategy</code></a> and <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>KthSelector</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>quantile</code> - the quantile to be computed</dd><dd><code>estimationType</code> - one of the percentile <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>estimation types</code></a></dd><dd><code>nanStrategy</code> - one of <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaNStrategy</code></a> to handle with NaNs</dd><dd><code>kthSelector</code> - a <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>KthSelector</code></a> to use for pivoting during search</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if p is not within (0,100]</dd>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - if type or NaNStrategy passed is null</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="setData(double[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setData</h4>
<pre>public&nbsp;void&nbsp;setData(double[]&nbsp;values)</pre>
<div class="block">Set the data array.
 <p>
 The stored value is a copy of the parameter array, not the array itself.
 </p></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#setData(double[])">setData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">AbstractUnivariateStatistic</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - data array to store (may be null to remove stored data)</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#evaluate()"><code>AbstractUnivariateStatistic.evaluate()</code></a></dd></dl>
</li>
</ul>
<a name="setData(double[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setData</h4>
<pre>public&nbsp;void&nbsp;setData(double[]&nbsp;values,
           int&nbsp;begin,
           int&nbsp;length)
             throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Set the data array.  The input array is copied, not referenced.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#setData(double[],%20int,%20int)">setData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">AbstractUnivariateStatistic</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - data array to store</dd><dd><code>begin</code> - the index of the first element to include</dd><dd><code>length</code> - the number of elements to include</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if values is null or the indices
 are not valid</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#evaluate()"><code>AbstractUnivariateStatistic.evaluate()</code></a></dd></dl>
</li>
</ul>
<a name="evaluate(double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evaluate</h4>
<pre>public&nbsp;double&nbsp;evaluate(double&nbsp;p)
                throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Returns the result of evaluating the statistic over the stored data.
 <p>
 The stored array is the one which was set by previous calls to
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setData(double[])"><code>setData(double[])</code></a>
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - the percentile value to compute</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value of the statistic applied to the stored data</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if p is not a valid quantile value
 (p must be greater than 0 and less than or equal to 100)</dd></dl>
</li>
</ul>
<a name="evaluate(double[], double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evaluate</h4>
<pre>public&nbsp;double&nbsp;evaluate(double[]&nbsp;values,
              double&nbsp;p)
                throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array.
 <p>
 Calls to this method do not modify the internal <code>quantile</code>
 state of this statistic.</p>
 <p>
 <ul>
 <li>Returns <code>Double.NaN</code> if <code>values</code> has length
 <code>0</code></li>
 <li>Returns (for any value of <code>p</code>) <code>values[0]</code>
  if <code>values</code> has length <code>1</code></li>
 <li>Throws <code>MathIllegalArgumentException</code> if <code>values</code>
 is null or p is not a valid quantile value (p must be greater than 0
 and less than or equal to 100) </li>
 </ul></p>
 <p>
 See <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><code>Percentile</code></a> for a description of the percentile estimation
 algorithm used.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - input array of values</dd><dd><code>p</code> - the percentile value to compute</dd>
<dt><span class="strong">Returns:</span></dt><dd>the percentile value or Double.NaN if the array is empty</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if <code>values</code> is null
     or p is invalid</dd></dl>
</li>
</ul>
<a name="evaluate(double[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evaluate</h4>
<pre>public&nbsp;double&nbsp;evaluate(double[]&nbsp;values,
              int&nbsp;start,
              int&nbsp;length)
                throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Returns an estimate of the <code>quantile</code>th percentile of the
 designated values in the <code>values</code> array.  The quantile
 estimated is determined by the <code>quantile</code> property.
 <p>
 <ul>
 <li>Returns <code>Double.NaN</code> if <code>length = 0</code></li>
 <li>Returns (for any value of <code>quantile</code>)
 <code>values[begin]</code> if <code>length = 1 </code></li>
 <li>Throws <code>MathIllegalArgumentException</code> if <code>values</code>
 is null, or <code>start</code> or <code>length</code> is invalid</li>
 </ul></p>
 <p>
 See <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><code>Percentile</code></a> for a description of the percentile estimation
 algorithm used.</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/UnivariateStatistic.html#evaluate(double[],%20int,%20int)">evaluate</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/UnivariateStatistic.html" title="interface in org.apache.commons.math3.stat.descriptive">UnivariateStatistic</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/util/MathArrays.Function.html#evaluate(double[],%20int,%20int)">evaluate</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/util/MathArrays.Function.html" title="interface in org.apache.commons.math3.util">MathArrays.Function</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#evaluate(double[],%20int,%20int)">evaluate</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">AbstractUnivariateStatistic</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - the input array</dd><dd><code>start</code> - index of the first array element to include</dd><dd><code>length</code> - the number of elements to include</dd>
<dt><span class="strong">Returns:</span></dt><dd>the percentile value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the parameters are not valid</dd></dl>
</li>
</ul>
<a name="evaluate(double[], int, int, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evaluate</h4>
<pre>public&nbsp;double&nbsp;evaluate(double[]&nbsp;values,
              int&nbsp;begin,
              int&nbsp;length,
              double&nbsp;p)
                throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Returns an estimate of the <code>p</code>th percentile of the values
 in the <code>values</code> array, starting with the element in (0-based)
 position <code>begin</code> in the array and including <code>length</code>
 values.
 <p>
 Calls to this method do not modify the internal <code>quantile</code>
 state of this statistic.</p>
 <p>
 <ul>
 <li>Returns <code>Double.NaN</code> if <code>length = 0</code></li>
 <li>Returns (for any value of <code>p</code>) <code>values[begin]</code>
  if <code>length = 1 </code></li>
 <li>Throws <code>MathIllegalArgumentException</code> if <code>values</code>
  is null , <code>begin</code> or <code>length</code> is invalid, or
 <code>p</code> is not a valid quantile value (p must be greater than 0
 and less than or equal to 100)</li>
 </ul></p>
 <p>
 See <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><code>Percentile</code></a> for a description of the percentile estimation
 algorithm used.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - array of input values</dd><dd><code>p</code> - the percentile to compute</dd><dd><code>begin</code> - the first (0-based) element to include in the computation</dd><dd><code>length</code> - the number of array elements to include</dd>
<dt><span class="strong">Returns:</span></dt><dd>the percentile value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if the parameters are not valid or the
 input array is null</dd></dl>
</li>
</ul>
<a name="getQuantile()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getQuantile</h4>
<pre>public&nbsp;double&nbsp;getQuantile()</pre>
<div class="block">Returns the value of the quantile field (determines what percentile is
 computed when evaluate() is called with no quantile argument).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>quantile set while construction or <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#setQuantile(double)"><code>setQuantile(double)</code></a></dd></dl>
</li>
</ul>
<a name="setQuantile(double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setQuantile</h4>
<pre>public&nbsp;void&nbsp;setQuantile(double&nbsp;p)
                 throws <a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></pre>
<div class="block">Sets the value of the quantile field (determines what percentile is
 computed when evaluate() is called with no quantile argument).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - a value between 0 < p <= 100</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if p is not greater than 0 and less
 than or equal to 100</dd></dl>
</li>
</ul>
<a name="copy()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;copy()</pre>
<div class="block">Returns a copy of the statistic with the same internal state.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/UnivariateStatistic.html#copy()">copy</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/UnivariateStatistic.html" title="interface in org.apache.commons.math3.stat.descriptive">UnivariateStatistic</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html#copy()">copy</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/AbstractUnivariateStatistic.html" title="class in org.apache.commons.math3.stat.descriptive">AbstractUnivariateStatistic</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a copy of the statistic</dd></dl>
</li>
</ul>
<a name="copy(org.apache.commons.math3.stat.descriptive.rank.Percentile, org.apache.commons.math3.stat.descriptive.rank.Percentile)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;copy(<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;source,
                   <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;dest)
                 throws <a href="../../../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception">MathUnsupportedOperationException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>as of 3.4 this method does not work anymore, as it fails to
 copy internal states between instances configured with different
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>estimation type</code></a>, <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaN handling strategies</code></a>
 and <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>kthSelector</code></a>, it therefore always
 throw <a href="../../../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception"><code>MathUnsupportedOperationException</code></a></i></div>
<div class="block">Copies source to dest.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - Percentile to copy</dd><dd><code>dest</code> - Percentile to copy to</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathUnsupportedOperationException.html" title="class in org.apache.commons.math3.exception">MathUnsupportedOperationException</a></code> - always thrown since 3.4</dd></dl>
</li>
</ul>
<a name="getWorkArray(double[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWorkArray</h4>
<pre>protected&nbsp;double[]&nbsp;getWorkArray(double[]&nbsp;values,
                    int&nbsp;begin,
                    int&nbsp;length)</pre>
<div class="block">Get the work array to operate. Makes use of prior <code>storedData</code> if
 it exists or else do a check on NaNs and copy a subset of the array
 defined by begin and length parameters. The set <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html#nanStrategy"><code>nanStrategy</code></a> will
 be used to either retain/remove/replace any NaNs present before returning
 the resultant array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>values</code> - the array of numbers</dd><dd><code>begin</code> - index to start reading the array</dd><dd><code>length</code> - the length of array to be read from the begin index</dd>
<dt><span class="strong">Returns:</span></dt><dd>work array sliced from values in the range [begin,begin+length)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</a></code> - if values or indices are invalid</dd></dl>
</li>
</ul>
<a name="getEstimationType()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEstimationType</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a>&nbsp;getEstimationType()</pre>
<div class="block">Get the estimation <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>type</code></a> used for computation.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the <code>estimationType</code> set</dd></dl>
</li>
</ul>
<a name="withEstimationType(org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withEstimationType</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;withEstimationType(<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank">Percentile.EstimationType</a>&nbsp;newEstimationType)</pre>
<div class="block">Build a new instance similar to the current one except for the
 <a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><code>estimation type</code></a>.
 <p>
 This method is intended to be used as part of a fluent-type builder
 pattern. Building finely tune instances should be done as follows:
 </p>
 <pre>
   Percentile customized = new Percentile(quantile).
                           withEstimationType(estimationType).
                           withNaNStrategy(nanStrategy).
                           withKthSelector(kthSelector);
 </pre>
 <p>
 If any of the <code>withXxx</code> method is omitted, the default value for
 the corresponding customization parameter will be used.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newEstimationType</code> - estimation type for the new instance</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new instance, with changed estimation type</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - when newEstimationType is null</dd></dl>
</li>
</ul>
<a name="getNaNStrategy()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNaNStrategy</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</a>&nbsp;getNaNStrategy()</pre>
<div class="block">Get the <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaN Handling</code></a> strategy used for computation.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>NaN Handling</code> strategy set during construction</dd></dl>
</li>
</ul>
<a name="withNaNStrategy(org.apache.commons.math3.stat.ranking.NaNStrategy)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withNaNStrategy</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;withNaNStrategy(<a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking">NaNStrategy</a>&nbsp;newNaNStrategy)</pre>
<div class="block">Build a new instance similar to the current one except for the
 <a href="../../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html" title="enum in org.apache.commons.math3.stat.ranking"><code>NaN handling</code></a> strategy.
 <p>
 This method is intended to be used as part of a fluent-type builder
 pattern. Building finely tune instances should be done as follows:
 </p>
 <pre>
   Percentile customized = new Percentile(quantile).
                           withEstimationType(estimationType).
                           withNaNStrategy(nanStrategy).
                           withKthSelector(kthSelector);
 </pre>
 <p>
 If any of the <code>withXxx</code> method is omitted, the default value for
 the corresponding customization parameter will be used.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newNaNStrategy</code> - NaN strategy for the new instance</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new instance, with changed NaN handling strategy</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - when newNaNStrategy is null</dd></dl>
</li>
</ul>
<a name="getKthSelector()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKthSelector</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util">KthSelector</a>&nbsp;getKthSelector()</pre>
<div class="block">Get the <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>kthSelector</code></a> used for computation.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the <code>kthSelector</code> set</dd></dl>
</li>
</ul>
<a name="getPivotingStrategy()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPivotingStrategy</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/util/PivotingStrategyInterface.html" title="interface in org.apache.commons.math3.util">PivotingStrategyInterface</a>&nbsp;getPivotingStrategy()</pre>
<div class="block">Get the <a href="../../../../../../../org/apache/commons/math3/util/PivotingStrategyInterface.html" title="interface in org.apache.commons.math3.util"><code>PivotingStrategyInterface</code></a> used in KthSelector for computation.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the pivoting strategy set</dd></dl>
</li>
</ul>
<a name="withKthSelector(org.apache.commons.math3.util.KthSelector)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>withKthSelector</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.html" title="class in org.apache.commons.math3.stat.descriptive.rank">Percentile</a>&nbsp;withKthSelector(<a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util">KthSelector</a>&nbsp;newKthSelector)</pre>
<div class="block">Build a new instance similar to the current one except for the
 <a href="../../../../../../../org/apache/commons/math3/util/KthSelector.html" title="class in org.apache.commons.math3.util"><code>kthSelector</code></a> instance specifically set.
 <p>
 This method is intended to be used as part of a fluent-type builder
 pattern. Building finely tune instances should be done as follows:
 </p>
 <pre>
   Percentile customized = new Percentile(quantile).
                           withEstimationType(estimationType).
                           withNaNStrategy(nanStrategy).
                           withKthSelector(newKthSelector);
 </pre>
 <p>
 If any of the <code>withXxx</code> method is omitted, the default value for
 the corresponding customization parameter will be used.
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>newKthSelector</code> - KthSelector for the new instance</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new instance, with changed KthSelector</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</a></code> - when newKthSelector is null</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Percentile.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Min.html" title="class in org.apache.commons.math3.stat.descriptive.rank"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../../org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html" title="enum in org.apache.commons.math3.stat.descriptive.rank"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/commons/math3/stat/descriptive/rank/Percentile.html" target="_top">Frames</a></li>
<li><a href="Percentile.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
